// 获取body节点
let body = document.querySelector("body");

// 绑定单击事件
body.addEventListener("click",function(evt){
    target = evt.target;


 
    //------------------------get----------------------------------
    if(target.className.includes("get")){
        
    }
    //------------------------put----------------------------------
    if(target.className.includes("put")){
        console.log("put");
    }
    //------------------------post----------------------------------
    if(target.className.includes("post")){
        let option = {
            url: "http://localhost:3000/users",
            methods:"POST",
            data:{
                "uid": "张三",
                "password": "666",
            },
            headers:{
                "Content-Type":"application/json"
            }
          };

          ajax(option);
        
          
    }
    //------------------------patch----------------------------------
    if(target.className.includes("patch")){
        console.log("patch");
    }
    //------------------------delete----------------------------------
    if(target.className.includes("delete")){
        console.log("delete");
    }

})